package com.dhl.adapter.objectadapter;

/**
 * @title: VoltageAdapter
 * @Author danghailiang
 * @Date: 2022/8/2 17:42
 * @Version 1.0
 */
public class VoltageAdapter  implements Voltage5V {
    private VoltageV220 voltageV220;

    VoltageAdapter(VoltageV220 voltageV220){
        this.voltageV220 = voltageV220;
    }
    /**
     * 开始适配
     * @return
     */
    @Override
    public int outPut5V(){
        int src = voltageV220.outPut();
        System.out.println("电压转换中......");
        return  src/40;
    }
}
